import http from "./index";
// 高德API长连接
let cityMessUrl = "/AMAP/v3/ip";
let localUrl = "/AMAP";
// 本地地址
let boke = 'http://localhost:3000'
let cityMess = (params,data) =>{
    return http.get(localUrl+"/posts",{params:params},data).then(res=>{return res}).catch(err=>{return err})
}
let postFun = (data)=>{
    return http.post(cityMessUrl,data).then(res=>{return res}).catch(err=>{return err})
}
let addmess = (params,data) =>{
    return http.post(boke+"/posts",{params:params},data).then(res=>{return res}).catch(err=>{return err})
}
export {http,cityMess,postFun,addmess};